<?php
/**
 * Created by : PhpStorm
 * User: DuFei
 * Date: 2020/7/31
 * Time: 10:50
 */

namespace app\models\request;

use app\components\UserNameValidator;
use yii\base\Model;

class ReqUserUpdate extends Model
{

    /**
     * @var int
     */
    private $userId;

    /**
     * @var string
     */
    private $username;

    /**
     * @var string
     */
    private $email;

    /**
     * @var string
     */
    private $mobile;

    /**
     * @var int
     */
    private $status;

    /**
     * @var int
     */
    private $createUserId;

    /**
     * @var string
     */
    private $password;

    /**
     * @var array
     */
    private $roleIdList;

    /**
     * @return int
     */
    public function getUserId()
    {
        return $this->userId;
    }

    /**
     * @param int $userId
     */
    public function setUserId($userId)
    {
        $this->userId = $userId;
    }

    /**
     * @return string
     */
    public function getUsername()
    {
        return $this->username;
    }

    /**
     * @param string $username
     */
    public function setUsername($username)
    {
        $this->username = $username;
    }

    /**
     * @return string
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * @param string $email
     */
    public function setEmail($email)
    {
        $this->email = $email;
    }

    /**
     * @return string
     */
    public function getMobile()
    {
        return $this->mobile;
    }

    /**
     * @param string $mobile
     */
    public function setMobile($mobile)
    {
        $this->mobile = $mobile;
    }

    /**
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * @param int $status
     */
    public function setStatus($status)
    {
        $this->status = $status;
    }

    /**
     * @return int
     */
    public function getCreateUserId()
    {
        return $this->createUserId;
    }

    /**
     * @param int $createUserId
     */
    public function setCreateUserId($createUserId)
    {
        $this->createUserId = $createUserId;
    }

    /**
     * @return string
     */
    public function getPassword()
    {
        return $this->password;
    }

    /**
     * @param string $password
     */
    public function setPassword($password)
    {
        $this->password = $password;
    }

    /**
     * @return array
     */
    public function getRoleIdList()
    {
        return $this->roleIdList;
    }

    /**
     * @param array $roleIdList
     */
    public function setRoleIdList($roleIdList)
    {
        $this->roleIdList = $roleIdList;
    }

    public function rules()
    {
        return [
            [['username', 'email'], 'required'],
            [['userId', 'username', 'email', 'mobile', 'status','createUserId','password','roleIdList'], 'safe'],
            ['username', UserNameValidator::class],
        ];
    }



}
